package com.hkw.service.impl;

import com.hkw.dao.ArticleDao;
import com.hkw.domain.Article;
import com.hkw.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 文章服务接口实现类
 * @Service将类注册到Spring容器里
 */
@Service
public class ArticleServiceImpl implements ArticleService {
    //自动注入
    @Autowired
    private ArticleDao articleDao;
    @Override
    public void saveArticle(Article article) {
        System.out.println("saveArticle方法...");
        articleDao.saveArticle(article);
      //  int a = 1/0;
    }
}
